home *** CD-ROM | disk | FTP | other *** search
- /********************************************************\
- CWASTEText.h
-
- \********************************************************/
-
- #pragma once
-
- #include "CAbstractText.h"
- #include "WASTE.h"
-
- class CWASTEText : public CAbstractText
- {
- public:
-
- TCL_DECLARE_CLASS
-
- // data members
- WEHandle macWE; // handle to WE data
- long spacingCmd; // Line spacing command number
- long alignCmd; // alignment cmd number
-
- // construction/destruction
- CWASTEText();
- CWASTEText(CView *anEnclosure, CBureaucrat *aSupervisor,
- short aWidth = 0, short aHeight = 0, short aHEncl = 0,
- short aVEncl = 0, SizingOption aHSizing = sizELASTIC,
- SizingOption aVSizing = sizELASTIC, short aLineWidth = -1,
- Boolean aScrollHoriz = FALSE);
-
- ~CWASTEText();
-
- void IWASTEText(CView *anEnclosure, CBureaucrat *aSupervisor,
- short aWidth, short aHeight,
- short aHEncl, short aVEncl,
- SizingOption aHSizing, SizingOption aVSizing,
- short aLineWidth);
- virtual void IViewTemp(CView *anEnclosure, CBureaucrat *aSupervisor,
- Ptr viewData);
- void IWASTETextX();
-
- // Mouse and Keystrokes
- virtual void DoClick(Point hitPt, short modifierKeys, long when);
- virtual void PerformEditCommand(long theCommand);
-
- // Display
- virtual void Draw(Rect *area);
- virtual void Scroll(long hDelta, long vDelta, Boolean redraw);
- virtual void Activate();
- virtual void Deactivate();
- virtual void SetSelection(long selStart, long selEnd, Boolean fRedraw);
-
- // Text Specification
- void Clear(void);
- virtual void SetTextPtr(Ptr textPtr, long numChars);
- virtual void StopInlineSession(void);
- virtual Handle GetTextHandle(void);
- virtual Handle CopyTextRange(long start, long end);
- void CopyRangeWithStyle(long start, long end, Handle hText,
- StScrpHandle hStyles);
- virtual void InsertTextPtr(Ptr text, long length, Boolean fRedraw);
- void InsertWithStyle(Ptr text, long length, StScrpHandle hStyles,
- Boolean fRedraw);
- virtual void TypeChar(char theChar, short theModifers);
-
- // Calibrating
- virtual void CalcWERects();
- virtual void ResizeFrame(Rect *delta);
- virtual void AdjustBounds();
-
- virtual long FindLine(long charPos);
- virtual long GetLength();
-
- // Text Characteristics
- virtual void SetFontNumber(short aFontNumber);
- virtual void SetFontStyle(short aStyle);
- virtual void SetFontSize(short aSize);
- virtual void SetTextMode(short aMode);
- virtual void SetAlignment(short anAlignment);
- virtual void SetAlignCmd(long alignCmd);
- virtual void SetSpacingCmd(long aSpacingCmd);
- virtual void SetTheStyleScrap(long rangeStart, long rangeEnd,
- StScrpHandle styleScrap, Boolean redraw);
- virtual void SetStyle(short mode, TextStyle *newStyle, Boolean redraw);
-
- virtual long GetHeight(long startLine, long endLine);
- virtual long GetCharOffset(LongPt *aPt);
- virtual void GetCharPoint(long offset, LongPt *aPt);
- virtual void GetTextStyle(short *whichAttributes, TextStyle *aStyle);
- virtual void GetCharStyle(long charOffset, TextStyle *theStyle);
- virtual long GetSpacingCmd();
- virtual long GetAlignCmd();
- virtual StScrpHandle GetTheStyleScrap();
-
- virtual long GetNumLines();
- virtual void GetSelection(long *selStart, long *selEnd);
- virtual void HideSelection(Boolean hide, Boolean redraw);
- virtual void GetSteps(short *hStep, short *vStep);
-
- // Printing
- virtual void AboutToPrint(short *firstPage, short *lastPage);
- virtual void PrintPage(short pageNum, short pageWidth, short pageHeight,
- CPrinter *aPRinter);
- virtual void DonePrinting();
-
- // Cursor
- virtual void Dawdle(long *maxSleep);
-
- // Object I/O
- virtual void PutTo(CStream& stream);
- virtual void GetFrom(CStream& stream);
- };
-